#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define BUFFSIZE 1024
/*
 * 计算当前日期之后的100天的日期
 * */
int main()
{
	time_t stmp;
	struct tm *tm;
	char buf[BUFFSIZE];
	
	stmp = time(NULL);
	tm = localtime(&stmp);
	strftime(buf, BUFFSIZE-1, "Now: %F", tm);
	puts(buf);

	// 增加100天
	tm->tm_mday += 100;
	(void)mktime(tm);
	strftime(buf, BUFFSIZE-1, "100 days later : %F", tm);
	puts(buf);

	exit(0);
}
